package com.LA_houseLease.app.service.impl;


import com.LA_houseLease.app.mapper.LeaseAgreementMapper;
import com.LA_houseLease.app.service.LeaseAgreementService;
import com.LA_houseLease.app.vo.agreement.AgreementDetailVo;
import com.LA_houseLease.app.vo.agreement.AgreementItemVo;
import com.LA_houseLease.pojo.entity.LeaseAgreement;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liubo
 * @description 针对表【lease_agreement(租约信息表)】的数据库操作Service实现
 * @createDate 2023-07-26 11:12:39
 */
@Service
public class LeaseAgreementServiceImpl extends ServiceImpl<LeaseAgreementMapper, LeaseAgreement>
        implements LeaseAgreementService {

    @Autowired
    private LeaseAgreementMapper leaseAgreementMapper;
    /**
     * 获取个人租约基本信息列表
     * @param phone
     * @return
     */
    @Override
    public List<AgreementItemVo> listItemByPhone(String phone) {
        return leaseAgreementMapper.listItemByPhone(phone);
    }

    /**
     * 根据id获取租约详细信息
     * @param id
     * @return
     */
    @Override
    public AgreementDetailVo getAgreementDetailVoDetailById(Long id) {
        return leaseAgreementMapper.getAgreementDetailVoDetailById(id);
    }
}




